/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hxg.portmgr.core.oper.snmp.oidgroup;

import hxg.portmgr.core.oper.snmp.param.Param;
import org.snmp4j.smi.OID;

/**
 *
 * @author hxg
 */
public enum ServerServicesOidEntry implements OidEntry, Param {

    svSvcName(new OID(".1.3.6.1.4.1.77.1.2.3.1.1")) {
        @Override
        public String chsname() {
            return "服务名";
        }
    },
    SvcOperationState(new OID(".1.3.6.1.4.1.77.1.2.3.1.3")) {
        @Override
        public String chsname() {
            return "状态";
//            active( 1 ),continue-pending( 2 ),pause-pending( 3 ),paused( 4 ) 
        }

        @Override
        public RemoteValueType remoteValueType() {
            return RemoteValueType.NumberValue;
        }
    },
    SvcCanBePaused(new OID(".1.3.6.1.4.1.77.1.2.3.1.5")) {
        @Override
        public String chsname() {
            return "是否能被暂停";
            //       cannot-be-paused( 1 ) ,can-be-paused( 2 ) 
        }

        @Override
        public RemoteValueType remoteValueType() {
            return RemoteValueType.NumberValue;
        }
    };

    private ServerServicesOidEntry(OID oid) {
        this.oid = oid;
    }
    final OID oid;

    @Override
    public OID getOID() {
        return oid;
    }

    @Override
    public String oidValue() {
        return oid.toString();
    }

    @Override
    public String unit() {
        return "";
    }

    @Override
    public RemoteValueType remoteValueType() {
        return RemoteValueType.StringValue;
    }

    @Override
    public OID getAppendOID(OID appendOid) {
        return (new OID(oid)).append(appendOid);
    }

    @Override
    public Param getParamType() {
        return this;
    }
}
